<%@ Page Language="C#" MasterPageFile="~/Default.master" AutoEventWireup="true" CodeBehind="Wall.aspx.cs" Inherits="MusicmanWeb.USER.Helpdesk" Title="Musicman Levi9 | Wall" %>
<%@ register tagprefix="umc" 
    tagname="MessageControl" 
    src="~/Custom/UserMessageControl.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Main" runat="server">
<script type="text/javascript">
    function ExpandColapse(txtBoxObj, expand) {
        if (expand) {
            txtBoxObj.rows = 3;
            if (txtBoxObj.value == 'write a message...' || txtBoxObj.value == 'write a comment...') {
                txtBoxObj.value = '';
            }
            txtBoxObj.style.color = "black";
        }
        else {
            txtBoxObj.rows = 1;
            if (txtBoxObj.value == '') {
                txtBoxObj.value = 'write a message...';
                txtBoxObj.style.color = "#999";
            }
        }
    }
</script>
<div class="shim column"></div>
<div class="page" id="home">
    <div id="sidebar">
    </div>
    <div id="content">
        <div id="messagebox" class="message-box">
            <div id="mainmessage" class="main-message">
                <div class="comment-box">
                    <textarea id="messagetxt" runat="server" enableviewstate="false" cols="39" rows="1" 
                        style="color:#999"
                        onclick="ExpandColapse(this, true);"
                        onblur="ExpandColapse(this, false);">write a message...</textarea>
                    <asp:LinkButton ID="CommentBtn" runat="server" OnCommand="AddMessage_Command" CommandName="AddMessage">Post a message</asp:LinkButton>
                </div>
            </div>
            <div id="imagebox" class="image-box">
                <img id="profileImg" runat="server" class="profilepic" src="" />
            </div>
        </div>    
        <hr />
        <asp:LinkButton ID="prevPage" runat="server" 
            OnCommand="PageCahnge_Command" CommandName="PageChanged" CommandArgument="prev">< Newer</asp:LinkButton> 
                messages from 
            <asp:LinkButton ID="nextPage" runat="server"
            OnCommand="PageCahnge_Command" CommandName="PageChanged" CommandArgument="next">Older ></asp:LinkButton>
        <asp:Repeater ID="wallmsgrepeater" 
                runat="server" 
                OnItemDataBound="Wallmsgrepeater_ItemDataBound"
                OnItemCommand="wallmsgrepeater_ItemCommand"
                EnableViewState="true">
            <HeaderTemplate>
                <div style="height: auto">
                <hr />
            </HeaderTemplate>
            <ItemTemplate>
                <umc:MessageControl ID="messagecontrol" runat="server" EnableViewState="true" />
                <hr />
            </ItemTemplate>
            <FooterTemplate>
                </div>
            </FooterTemplate>
        </asp:Repeater>
    </div>
</div>
</asp:Content>
